To edit the layout source in Layout Studio please use 'View Page Source' button on the Html Editor toolbar (see Picture 1), rather than switching to Html view in the bottom (see Picture 2). Html view contains internal representaion of the layout showed in Normal view, and is very uncomfortable for editing.
Picture 1. View Page Source button
Picture 2. HTML view and IFRAME tag